package com.ybkj.daijia.server.dockingsupervise.zhuanche;

import java.io.Serializable;
import java.util.Date;

public class ClbxMessage implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String insuranceCompany;//保险公司名称
    private String insuranceCode;//保险号
    private String insuranceType;//保险类型
    private Double insuranceAmount;//保险金额
    private Date insuranceValidDate;//保险生效时间
    private Date insuranceEndDate;//保险到期时间
    private String vehicleLicense;//车辆号牌
    private String certificateNo;
    private String appKey;
    private Date created;
    private Date updated;
    private int flag;//操作标识
    private String type = Type.MOREQ_CLBX;

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getInsuranceCompany() {
        return insuranceCompany;
    }

    public void setInsuranceCompany(String insuranceCompany) {
        this.insuranceCompany = insuranceCompany == null ? null : insuranceCompany.trim();
    }

    public String getInsuranceCode() {
        return insuranceCode;
    }

    public void setInsuranceCode(String insuranceCode) {
        this.insuranceCode = insuranceCode == null ? null : insuranceCode.trim();
    }

    public String getInsuranceType() {
        return insuranceType;
    }

    public void setInsuranceType(String insuranceType) {
        this.insuranceType = insuranceType == null ? null : insuranceType.trim();
    }

    public Double getInsuranceAmount() {
        return insuranceAmount;
    }

    public void setInsuranceAmount(Double insuranceAmount) {
        this.insuranceAmount = insuranceAmount;
    }

    public Date getInsuranceValidDate() {
        return insuranceValidDate;
    }

    public void setInsuranceValidDate(Date insuranceValidDate) {
        this.insuranceValidDate = insuranceValidDate;
    }

    public Date getInsuranceEndDate() {
        return insuranceEndDate;
    }

    public void setInsuranceEndDate(Date insuranceEndDate) {
        this.insuranceEndDate = insuranceEndDate;
    }

    public String getVehicleLicense() {
        return vehicleLicense;
    }

    public void setVehicleLicense(String vehicleLicense) {
        this.vehicleLicense = vehicleLicense == null ? null : vehicleLicense.trim();
    }

    public String getCertificateNo() {
        return certificateNo;
    }

    public void setCertificateNo(String certificateNo) {
        this.certificateNo = certificateNo == null ? null : certificateNo.trim();
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey == null ? null : appKey.trim();
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ClbxMessage other = (ClbxMessage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getInsuranceCompany() == null ? other.getInsuranceCompany() == null
            : this.getInsuranceCompany().equals(other.getInsuranceCompany()))
            && (this.getInsuranceCode() == null ? other.getInsuranceCode() == null
            : this.getInsuranceCode().equals(other.getInsuranceCode()))
            && (this.getInsuranceType() == null ? other.getInsuranceType() == null
            : this.getInsuranceType().equals(other.getInsuranceType()))
            && (this.getInsuranceAmount() == null ? other.getInsuranceAmount() == null
            : this.getInsuranceAmount().equals(other.getInsuranceAmount()))
            && (this.getInsuranceValidDate() == null ? other.getInsuranceValidDate() == null
            : this.getInsuranceValidDate().equals(other.getInsuranceValidDate()))
            && (this.getInsuranceEndDate() == null ? other.getInsuranceEndDate() == null
            : this.getInsuranceEndDate().equals(other.getInsuranceEndDate()))
            && (this.getVehicleLicense() == null ? other.getVehicleLicense() == null
            : this.getVehicleLicense().equals(other.getVehicleLicense()))
            && (this.getCertificateNo() == null ? other.getCertificateNo() == null
            : this.getCertificateNo().equals(other.getCertificateNo()))
            && (this.getAppKey() == null ? other.getAppKey() == null
            : this.getAppKey().equals(other.getAppKey()))
            && (this.getCreated() == null ? other.getCreated() == null
            : this.getCreated().equals(other.getCreated()))
            && (this.getUpdated() == null ? other.getUpdated() == null
            : this.getUpdated().equals(other.getUpdated()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getInsuranceCompany() == null) ? 0
            : getInsuranceCompany().hashCode());
        result =
            prime * result + ((getInsuranceCode() == null) ? 0 : getInsuranceCode().hashCode());
        result =
            prime * result + ((getInsuranceType() == null) ? 0 : getInsuranceType().hashCode());
        result =
            prime * result + ((getInsuranceAmount() == null) ? 0 : getInsuranceAmount().hashCode());
        result = prime * result + ((getInsuranceValidDate() == null) ? 0
            : getInsuranceValidDate().hashCode());
        result = prime * result + ((getInsuranceEndDate() == null) ? 0
            : getInsuranceEndDate().hashCode());
        result =
            prime * result + ((getVehicleLicense() == null) ? 0 : getVehicleLicense().hashCode());
        result =
            prime * result + ((getCertificateNo() == null) ? 0 : getCertificateNo().hashCode());
        result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", insuranceCompany=").append(insuranceCompany);
        sb.append(", insuranceCode=").append(insuranceCode);
        sb.append(", insuranceType=").append(insuranceType);
        sb.append(", insuranceAmount=").append(insuranceAmount);
        sb.append(", insuranceValidDate=").append(insuranceValidDate);
        sb.append(", insuranceEndDate=").append(insuranceEndDate);
        sb.append(", vehicleLicense=").append(vehicleLicense);
        sb.append(", certificateNo=").append(certificateNo);
        sb.append(", appKey=").append(appKey);
        sb.append(", created=").append(created);
        sb.append(", updated=").append(updated);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
